package com.ww.springboot.dd.config;

import com.ww.springboot.dd.mapper.HiveMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.List;
import java.util.Map;

/**
 * 描述：
 *
 * @author 🧑 ‍wanwei
 * @since 2023-03-01 11:14
 */
//@Component
@AllArgsConstructor
public class MapperTest {

    private final HiveMapper hiveMapper;

    //@PostConstruct
    public void init() throws InterruptedException {

        for (int i = 0; i < 100; i++) {
//            Long t = System.currentTimeMillis();
//            Object o = hiveMapper.selectAll("RBK7M699XZW");
//            Long t1 = System.currentTimeMillis();
//            System.out.println(i + ":" + (t1 - t));
//            System.out.println(o);
//
//            Long tt = System.currentTimeMillis();
//            List<Map<String, String>> maps = hiveMapper.selectAll2("RBK7M699XZW");
//            Long tt1 = System.currentTimeMillis();
//            System.out.println(i + "查全部:" + (tt1 - tt));
//            System.out.println(maps);
        }

    }
}
